package com.baidumap.administrator.happystudy.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/5/3 10:26
 * 邮箱：2235445233@qq.com
 */
public class Activities {


    /**
     * code : 200
     * msg : success
     * data : [{"product_id":"2982","product_name":"保湿面霜","product_pic1":"http://yigoo.gxhao.cc/Uploads/2017-04-17/58f3fcd97efb4.jpg","buy_numbers":"0","price":"0.01","reviews":"100"},{"product_id":"2984","product_name":"乳套装补水礼盒","product_pic1":"http://yigoo.gxhao.cc/Uploads/2017-04-24/58fe1908bcfb5.png","buy_numbers":"0","price":"0.01","reviews":"100"}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public Activities(String json) {
        Activities result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * product_id : 2982
         * product_name : 保湿面霜
         * product_pic1 : http://yigoo.gxhao.cc/Uploads/2017-04-17/58f3fcd97efb4.jpg
         * buy_numbers : 0
         * price : 0.01
         * reviews : 100
         */

        private String product_id;
        private String product_name;
        private String product_pic1;
        private String buy_numbers;
        private String price;
        private String reviews;

        public String getProduct_id() {
            return product_id;
        }

        public void setProduct_id(String product_id) {
            this.product_id = product_id;
        }

        public String getProduct_name() {
            return product_name;
        }

        public void setProduct_name(String product_name) {
            this.product_name = product_name;
        }

        public String getProduct_pic1() {
            return product_pic1;
        }

        public void setProduct_pic1(String product_pic1) {
            this.product_pic1 = product_pic1;
        }

        public String getBuy_numbers() {
            return buy_numbers;
        }

        public void setBuy_numbers(String buy_numbers) {
            this.buy_numbers = buy_numbers;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getReviews() {
            return reviews;
        }

        public void setReviews(String reviews) {
            this.reviews = reviews;
        }
    }
}
